


cmake_minimum_required(VERSION 3.0)

project(http_protocol)


add_definitions(-Wall -Wshadow -std=c++17)
include_directories(./../)
include_directories(./../../string_util/)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(test_http_protocol_util_src_list ./test_http_protocol_util.cpp
  ./../http_protocol_msg.cpp
  ./../http_protocol_parser.cpp)

set(test_http_protocol_request_src_list ./test_http_protocol_request.cpp
  ./../http_protocol_msg.cpp
  ./../http_protocol_parser.cpp
  ./../../string_util/string_util.cpp)


set(test_http_protocol_response_src_list ./test_http_protocol_response.cpp
  ./../http_protocol_msg.cpp
  ./../http_protocol_parser.cpp
  ./../../string_util/string_util.cpp)


add_executable(TEST_HTTP_PROTOCOL_PARSER ${test_http_protocol_util_src_list})
add_executable(TEST_HTTP_PROTOCOL_REQUEST ${test_http_protocol_request_src_list})
add_executable(TEST_HTTP_PROTOCOL_RESPONSE ${test_http_protocol_response_src_list})

set(test_http_util_src_list ./test_http_util.cpp ./../http_protocol_msg.cpp)

add_executable(TEST_HTTP_UTIL ${test_http_util_src_list})

set(libs gtest)

target_link_libraries(TEST_HTTP_PROTOCOL_PARSER ${libs})
target_link_libraries(TEST_HTTP_PROTOCOL_REQUEST ${libs})
target_link_libraries(TEST_HTTP_PROTOCOL_RESPONSE ${libs})
target_link_libraries(TEST_HTTP_UTIL ${libs} gtest_main)
